<template>
	<view class="aside-index" ref="uv-back-top">
		<uv-text align="center" size="11" :text="tips" color="#929292" :customStyle="{marginBottom:'15px'}"></uv-text>
		<uv-text align="center" size="11" :text="appName + '软件版本：'+version" color="#ffb0f8"
			:customStyle="{marginBottom:'15px'}"></uv-text>
		<uv-toast ref="toast"></uv-toast>
	</view>
</template>

<script>
	// 引入
	import {
		task,
		index,
		taskId,
		getScroll,
		scroll,
	} from '@/common/api.js';
	import config from '@/common/config'
	export default {
		components: {
			// 注册组件
		},
		props: {
			// aicurrent: {
			// 	type: Number,
			// 	default: 0
			// },
		},
		data() {
			return {
				tabbarsValue: 'chat',
				scrollTop: 0,
				appName: config.appName,
				version: config.version,
				tips: config.appName + '将根据第三方账号服务平台的授权范围获取你的信息',
			}
		},
		watch: {
			// 监听data数据的变化
		},
		mounted() {
			var that = this;
			this.tabbarsValue = this.pages();
		},
		methods: {
			submit() {
				this.$emit('custom-event', this.chat);
				this.$emit('submit');
			},
			routes(url) {
				this.routed('/pages' + url);
			},
			pages() {
				var pages = getCurrentPages() // 获取栈实例
				let currentRoute = pages[pages.length - 1].route; // 获取当前页面路由
				let currentPage = pages[pages.length - 1]['$page']['fullPath'] //当前页面路径(带参数)
				return currentPage.split('/')[2];
			},
			routed(url) {
				console.log('routed', url)
				uni.$uv.route({
					url: url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@import "@/uni_modules/uv-ui-tools/index.scss";
</style>